const menuButtonInfo = typeof uni.getMenuButtonBoundingClientRect === 'function' 
    ? uni.getMenuButtonBoundingClientRect() 
    : null;
const {
    width: MenuButtonWidth = 0,
    height: MenuButtonHeight = 0,
    top: MenuButtonPositionTop = 0,
    right: MenuButtonPositionRight = 0,
    left: MenuButtonPositionLeft = 0
} = menuButtonInfo || {};

const {
    windowWidth,
    windowHeight,
    // 状态栏高度
    statusBarHeight,
    // 标题栏高度
    navigationBarHeight = 2 * (MenuButtonPositionTop - statusBarHeight) + MenuButtonHeight
    // safeArea: {}
} = uni.getSystemInfoSync();

const navigationBarWidth = MenuButtonPositionLeft - (windowWidth - MenuButtonPositionRight);

const menuButtonRightWidth = MenuButtonWidth + (windowWidth - MenuButtonPositionRight);

export {
    windowWidth,
    windowHeight,
    statusBarHeight,
    navigationBarWidth,
    navigationBarHeight,
    MenuButtonWidth,
    MenuButtonHeight,
    MenuButtonPositionTop,
    MenuButtonPositionRight,
    MenuButtonPositionLeft,
    menuButtonRightWidth
}
